package eScrum;

import org.apache.wicket.Session;
import org.apache.wicket.authroles.authorization.strategies.role.IRoleCheckingStrategy;
import org.apache.wicket.authroles.authorization.strategies.role.Roles;


public class UserRolesAuthorizer  implements IRoleCheckingStrategy {
	
	public UserRolesAuthorizer() {
	
	}

	public boolean hasAnyRole(Roles roles) {
		UserSession authSession = (UserSession) Session.get();
		if (authSession != null && authSession.getUser() != null) {
			return authSession.getUser().hasAnyRole(roles);
		} else {
			return false;
		}
	}



}
